import React, {Component} from 'react';
import {View, Text, Navigator} from 'react-native';
import AlbumStack from '../list/albumStack';
import Login from '../login/login';
import {NavigationContainer} from '@react-navigation/native';
import {createNativeStackNavigator} from 'react-native-screens/native-stack';
import {enableScreens} from 'react-native-screens';
import header from '../header/header';
enableScreens();
const Stack = createNativeStackNavigator();
// const Stack = createStackNavigator();
export default class loginRouter extends Component {
  constructor(props) {
    super(props);
    this.state = {};
  }
  render() {
    return (
      <NavigationContainer>
        <Stack.Navigator
          initialRouteName="Login"
          screenOptions={{
            headerShown: false,
          }}>
          <Stack.Screen
            name="登录"
            component={Login}
            navigationOptions={{header: {visible: false}}}
          />
          <Stack.Screen
            screenOptions={{
              headerShown: false,
            }}
            name="北城之音a"
            component={AlbumStack}
            navigationOptions={{header: {visible: false}}}
          />
        </Stack.Navigator>
      </NavigationContainer>
    );
  }
  //第一次调用的时候，第一个参数route就是initialRoute
  // renderScene = (route, navigator) => {
  //   return (
  //     <route.scene
  //       navigator={navigator}
  //     />
  // };

  //默认的route数据，其中必须包含第一次需要渲染的场景，不然显示啥？
  // initialRoute = {
  //   scene: Login,

  // };

  // render() {
  //   return (
  //     <Navigator
  //       initialRoute={this.initialRoute}
  //       renderScene={this.renderScene}
  //     />
  //   );
  // }
}
